# install_ubuntu_py38.sh
# create date： 2024.01.27

# 进入管理员权限
#$ sudo su
#83418341

#root@ubuntu:/home/wuchunlong# chmod a+x  install_ubuntu_py38.sh
#root@ubuntu:/home/wuchunlong# ./install_ubuntu_py38.sh 

# 安装依赖包
apt-get update
apt-get install software-properties-common

# 添加 deadsnakes PPA 源
add-apt-repository ppa:deadsnakes/ppa
#Press [ENTER] to continue or Ctrl-c to cancel adding it.

# 安装 python 3.8
apt-get update
apt-get install python3.8.10

python3.8 -V
#Python 3.8.10

#配置 python3.8 为系统默认 python3
which python3.8
#/usr/bin/python3.8

update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1

# 配置 python3 默认指向 python3.8
update-alternatives --config python3

# 测试 python 版本
python3 -V
#Python 3.8.10


# https://www.jb51.net/article/221437.htm
# Ubuntu安装Python3.8 https://blog.csdn.net/weixin_43815902/article/details/112468083


